package shajie.shajun.mmhf.Adapter.ViewHolder;

import android.databinding.ViewDataBinding;
import android.util.Log;
import android.view.View;

import java.util.ArrayList;
import java.util.List;

import shajie.shajun.mmhf.Base.BaseRecyclerHolder;
import shajie.shajun.mmhf.Bean2.Product;
import shajie.shajun.mmhf.databinding.ItemProductDetailBinding;

import static android.content.ContentValues.TAG;

/**
 * Created by admin on 2017/11/27.
 */

public class DetailAdapterHolder extends BaseRecyclerHolder {
    private ItemProductDetailBinding mBinding;
    private List<Integer> activitys=new ArrayList<>();
    public DetailAdapterHolder(ViewDataBinding binding,int size) {
        super(binding);
        this.mBinding = (ItemProductDetailBinding)binding;
        for (int i = 0; i <size ; i++) {
            activitys.add(View.INVISIBLE);
        }
    }

    @Override
    public void init(Object c, int position) {
        Product item=(Product)c;
        mBinding.setProducts(item);
        mBinding.tvActivity.setVisibility(View.VISIBLE);
        Log.e(TAG, "init: "+position);
        mBinding.executePendingBindings();
    }
}
